<template>
	<view >
		<view class="main" :style="'height:'+screenHeight+'rpx'">
		 <video :src="vsrc" style="width:100%;" objectFit="cover" autoplay=true></video>
		</view>
		 <view class="footer">
		   	 更多精彩作品，前往片拍拍
			 <image src="https://ppp.new.zeroitem.cn/ppp/arrrow.png" class="pimg30" @click="jump"></image>
		 </view>
	</view>
	
</template>

<script>
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	import {
		loadingFun,
		menuJump
	} from '@/utils/tools'	
	import {
	   yxdetail
	} from '@/api/ppp'	
 const app = getApp();
  export default {
	    data() {
	        return {
              screenHeight: 0,
			  vsrc:"",
			  sn:"",
			  type:1,
			  fxid:0,
	        }
	    },
		onShow(){
            	uni.getSystemInfo({ //设置屏幕高度
           				success: res => {
						   var rpx=(res.screenHeight * (750 / res.windowWidth)); 
						   this.screenHeight=rpx-300;
           				},
						fail:res=>{
							console.log(res);
						}
           		})
		},
		onLoad(options){
		  var type=options.type;
		  var id=options.id;
		  var sn=options.sn;
		  this.type=type;
		  this.fxid=id;
		  this.getvideo(type,id);
		  if(sn!="" && sn!=undefined){
			this.sn=sn;
		  	uni.setStorageSync("tjsn",sn);
		  }
		},

	    methods: {
		  async getvideo(type,id){
			if(type==1){var flag=0;}
			if(type==2){var flag=1;}
	        const{
	         code,
	         msg,
	         data
	        }= await yxdetail({flag:flag,id:id});
			this.vsrc=data.vsrc;
		  },
		  jump(){
			var sn=uni.getStorageSync("tjsn");
			var type=this.type;
			var fxid=this.fxid;
			uni.navigateTo({
				url:"/pages/ppp/index/drps?sn="+sn+"&type="+type+"&fxid="+fxid
			})  
		  }
	    },
	   computed: {
	  	...mapGetters(['isLogin']),
	   }	
		
	}		 
	 
	 
	 
	 
	 
	 
</script>
<style>
 @import "./zpshare.css";	
</style>